
#include <stdint.h>

#include "../User/Component/AHRS.h"
#include "../User/Component/CMD.h"
#include "../User/Component/PID.h"

#define TASK_CONTROL_SCAN_FREQ (500.0f)

/**
 * @brief 电机控制初始化
 *
 */
void Control_Init(void);

/**
 * @brief 控制电机输出
 *
 * @param motor_a
 * @param motor_b
 */
void Control_MotorOut(int32_t motor_a, int32_t motor_b);

/**
 * @brief 应用PID校准
 *
 * @param angle_pid
 * @param speed_pid
 * @param angle
 * @param gyro
 * @param cmd
 */
void Control_CalOutput(PID_Param_t* angle_pid, PID_Param_t* speed_pid,
                       AHRS_Angle_t* angle, AHRS_Gyro_t* gyro,
                       CMD_Param_t* cmd);
